
import { createRouter, createWebHashHistory, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'Login',
    meta: {
      title: "登录"
    },
    component: () => import('../views/Login.vue')
  }
  ,
  {
    path: '/',
    name: 'Home',
    meta: {
      title:"首页"
    },
    component: () => import('../views/Home.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

router.afterEach((to) => {

  document.title = to.meta.title + "-智慧养老系统";

})
 



export default router
